﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FinalMoviles
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void panel2_GotFocus(object sender, EventArgs e)
        {

        }

        private void panel1_GotFocus(object sender, EventArgs e)
        {

        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            swDatos.Service objServicio = new swDatos.Service();
            int respuesta = objServicio.AutenticaCliente(txtUsuario.Text, txtPass.Text);

            if (respuesta != 0)
            {
                clsGlobales.Global_cve_cte = respuesta;
                Menu fact = new Menu();
                this.Hide();
                fact.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Usuario y password incorrecto");
            }
        }
    }
}